﻿<%@ Page CodeFileBaseClass="AliCMS.Lib.SystemPageBase" %>
<ali:Get ID="Teacher" Object="Teacher" InnerID="Request.QueryString['ID']" Validate="True" />
<ali:Get ID="Config" Object="InstanceConfig" Operation="GetBasicSettings()" />
<section data-page="teacher_edit" data-title="编辑教师" data-id="<%=Teacher[InnerID]%>" data-thumbanil-width="<%=Config[CourseThumbnailWidth]%>" data-thumbanil-height="<%=Config[CourseThumbnailHeight]%>" data-lang="<%=ContentLang%>">
	<dl class="path1">
		<dt><span>您的位置：</span><a href="list.aspx?Lang=<%=ContentLang%>" target="ali-navtab">教师列表</a> → <b class="<%=ContentLang%>Font"><%=Teacher[Name]%></b></dt>
		<dd>
			<select data-class="<%=ContentLang%>Font" data-ali-widget="combo">
				<ali:List Mark="System" Object="Language" Source="Manager.Languages">
					<ali:Record>
						<%If Convert.ToString(Ab) == ContentLang%>
							<option value="<%=Ab%>" selected><%=[AliCMS.SystemModule.Alias.Language.Name + PageLang]%></option>
						<%Else%>
							<option value="<%=Ab%>"><%=[AliCMS.SystemModule.Alias.Language.Name + PageLang]%></option>
						<%EndIf%>
					</ali:Record>
				</ali:List>
			</select>
		</dd>
	</dl>
	<form class="post">
		<div class="post-body">
			<div class="ali-tabs" data-event="click" data-height-style="fill">
				<div class="ali-tabs-header">
					<div class="ali-tabs-nav-container">
						<ul>
							<li class="ali-active"><a>编辑</a></li>
							<li><a href="stat_order_one.aspx?Lang=<%=ContentLang%>&ID=<%=Request.QueryString["ID"]%>" target="ali-navtab">订单统计</a></li>
							<li><a href="stat_money.aspx?Lang=<%=ContentLang%>&ID=<%=Request.QueryString["ID"]%>" target="ali-navtab">收入统计</a></li>
						</ul>
					</div>
				</div>
				<div class="ali-tabs-body">
					<div class="ali-tabs-panel">
						<table class="post-table margin2">
							<tr>
								<th>名称：</th>
								<td><input type="text" name="Name" value="<%=Teacher[Name]%>" size="60" maxlength="150" class="ali-input <%=ContentLang%>Font"></td>
							</tr>
							<tr>
								<th>图片：</th>
								<td>
									<input type="text" name="Picture" value="<%=Teacher[Picture]%>" size="55" class="ali-input CHSFont">
									<button type="button" class="ali-button" data-operation="SelectPicture">选择图片...</button>
									<a href="<%=Teacher[Picture]%>" target="_blank"><img src="<%=Teacher[Picture]%>" style="width:22px;height:22px;vertical-align:middle"></a>
								</td>
							</tr>
							<tr>
								<th>佣金：</th>
								<td><input type="text" name="Commision" value="<%=Teacher[Commision]%>" size="6" maxlength="4" class="ali-input CHSFont">%</td>
							</tr>
							<tr>
								<th>绑定用户：</th>
								<td>
									<input type="text" name="UserName" value="<%=Teacher[UserName]%>" size="30" readonly class="ali-input CHSFont">
									<input type="hidden" name="UserID" value="<%=Teacher[UserID]%>"><a class="ali-button" data-operation="SelectUser">选择</a> <a class="ali-button" data-operation="ClearUser">清空</a>
								</td>
							</tr>
							<tr>
								<th>描述：</th>
								<td>
									<textarea name="Description" data-instance="<%=InstanceID%>" class="editor"><%=HttpUtility.HtmlEncode(Teacher[Description].ToString())%></textarea>
								</td>
							</tr>
							<tr>
								<th>推荐：</th><td><input type="number" name="Recommend" value="<%=Teacher[Recommend]%>" min="0" required class="ali-input CHSFont" style="width:60px"></td>
							</tr>
							<tr>
								<th>是否审核：</th>
								<td>
									<%If Convert.ToInt32(Teacher[IsChecked]) == 0%>
										<label><input type="radio" name="IsChecked" value="0" checked>待审核</label>
										<label><input type="radio" name="IsChecked" value="1">已通过</label>
										<label><input type="radio" name="IsChecked" value="-1">未通过</label>
									<%ElseIf Convert.ToInt32(Teacher[IsChecked]) == 1%>
										<label><input type="radio" name="IsChecked" value="0">待审核</label>
										<label><input type="radio" name="IsChecked" value="1" checked>已通过</label>
										<label><input type="radio" name="IsChecked" value="-1">未通过</label>
									<%Else%>
										<label><input type="radio" name="IsChecked" value="0">待审核</label>
										<label><input type="radio" name="IsChecked" value="1">已通过</label>
										<label><input type="radio" name="IsChecked" value="-1" checked>未通过</label>
									<%EndIf%>
								</td>
							</tr>
							<tr>
								<th>人气：</th>
								<td><%=Teacher[HitCount]%></td>
							</tr>
							<tr>
								<th>创建日期：</th>
								<td><%=Teacher[CreateTime]%></td>
							</tr>
						</table>
					</div>
				</div>
				<div class="ali-tabs-bottom"><b></b></div>
			</div>
		</div>
		<div class="post-footer"><button type="submit" class="ali-button">保 存</button><input type="hidden" name="PictureAllowedType" value="gif|jpg|jpeg|png|bmp|png"></div>
	</form>
</section>